package junior.Simulation模拟;

public class SingletonPatternDemo {
    public static void main(String[] args) {
        SingleObject singleObject = SingleObject.getInstance();
        singleObject.showMessage();
        System.out.println("*************************");
        for (int i = 0; i < 111; i++) {
            singleObject.setNumAddOne();
        }

        singleObject.showMessage();
        System.out.println("*************************");
        SingleObject singleObject1 = SingleObject.getInstance();

        for (int i = 0; i < 111; i++) {
            singleObject1.setNumAddOne();
        }
        singleObject1.showMessage();
    }
}
